package com.zbkj.crmeb.store.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 * 用户资金表
 * </p>
 *
 * @author cyz
 * @since 2021-04-09
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("eb_user_commission")
@ApiModel(value="UserCommission", description="用户资金表")
public class UserCommission implements Serializable {

    private static final long serialVersionUID=1L;

    @ApiModelProperty(value = "id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "用户id")
    private Integer uid;

    @ApiModelProperty(value = "订单id")
    private String orderId;

    @ApiModelProperty(value = "拼团活动id")
    private Integer activityGroupId;

    @ApiModelProperty(value = "订单是否已确认收货(0:否 1:是)")
    private Integer orderComplete;

    @ApiModelProperty(value = "是否是使用拼团佣金比例计算(0:否 1:是)")
    private Integer isGroupRebate;

    @ApiModelProperty(value = "标题")
    private String title;

    @ApiModelProperty(value = "资金类型1:佣金 2:提现")
    private Integer type;

    @ApiModelProperty(value = "金额")
    private BigDecimal amount;

    @ApiModelProperty(value = "佣金总金额交易金额")
    private BigDecimal totalAmount;

    @ApiModelProperty(value = "冻结佣金交易金额")
    private BigDecimal freezeAmount;

    @ApiModelProperty(value = "可提现佣金交易金额")
    private BigDecimal withdrawalAmount;

    @ApiModelProperty(value = "已提现佣金交易金额")
    private BigDecimal closeAmount;

    @ApiModelProperty(value = "用户可用余额交易金额")
    private BigDecimal userAmount;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "佣金订单(1:冻结 2:解冻) 提现订单(1:申请中 2:审核成功 3:审核失败)")
    private Integer status;

    @ApiModelProperty(value = "是否允许解冻 1:是 2否")
    private Integer isFreeze;

    @ApiModelProperty(value = "创建时间")
    private Date createTime;
}
